import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        name: '弹出框组件',
        component: () => import('@/layout/MainContent.vue'),
        path: '/IDialog',
        meta: { id: 'IDialog' },
        children: [
            {
                name: '弹出框组件',
                component: () => import('@/views/IDialog/index.vue'),
                path: '/dialog',
                meta: { id: 'dialog' }
            }
        ]
    },
    {
        name: '表格组件',
        component: () => import('@/layout/MainContent.vue'),
        path: '/ITable',
        meta: { id: 'ITable' },
        children: [
            {
                name: '表格组件',
                component: () => import('@/views/ITable/index.vue'),
                path: '/table',
                meta: { id: 'table' }
            }
        ]
    },
    {
        name: '表单组件',
        component: () => import('@/layout/MainContent.vue'),
        path: '/IForm',
        meta: { id: 'IForm' },
        children: [
            {
                name: '表单组件',
                component: () => import('@/views/IForm/index.vue'),
                path: '/form',
                meta: { id: 'form' }
            }
        ]
    },
    {
        name: '搜索条件',
        component: () => import('@/layout/MainContent.vue'),
        path: '/ISearch',
        meta: { id: 'ISearch' },
        children: [
            {
                name: '搜索条件',
                component: () => import('@/views/ISearch/index.vue'),
                path: '/search',
                meta: { id: 'search' }
            }
        ]
    },
    {
        name: '高级搜索',
        component: () => import('@/layout/MainContent.vue'),
        path: '/ISeniorSearch',
        meta: { id: 'ISeniorSearch' },
        children: [
            {
                name: '高级搜索',
                component: () => import('@/views/ISeniorSearch/index.vue'),
                path: '/seniorSearch',
                meta: { id: 'seniorSearch' }
            }
        ]
    },
    {
        name: '树结构',
        component: () => import('@/layout/MainContent.vue'),
        path: '/ITree',
        meta: { id: 'ITree' },
        children: [
            {
                name: '树结构',
                component: () => import('@/views/ITree/index.vue'),
                path: '/tree',
                meta: { id: 'tree' }
            }
        ]
    },
    {
        name: '抽屉',
        component: () => import('@/layout/MainContent.vue'),
        path: '/IDrawer',
        meta: { id: 'IDrawer' },
        children: [
            {
                name: '抽屉',
                component: () => import('@/views/IDrawer/index.vue'),
                path: '/drawer',
                meta: { id: 'drawer' }
            }
        ]
    },
    {
        name: '穿梭框',
        component: () => import('@/layout/MainContent.vue'),
        path: '/Transfer',
        meta: { id: 'Transfer' },
        children: [
            {
                name: '穿梭框表格',
                component: () => import('@/views/Transfer/TransferTable/index.vue'),
                path: '/transferTable',
                meta: { id: 'transferTable' }
            },
            {
                name: '穿梭框树',
                component: () => import('@/views/Transfer/TransferTree/index.vue'),
                path: '/transferTree',
                meta: { id: 'transferTree' }
            },
            {
                name: '穿梭框树(自定义)',
                component: () => import('@/views/Transfer/TransferTreeCheckStrictly/index.vue'),
                path: '/transferTreeCheckStrictly',
                meta: { id: 'transferTreeCheckStrictly' }
            }
        ]
    },
    {
        name: '公共msg',
        component: () => import('@/layout/MainContent.vue'),
        path: '/IMsg',
        meta: { id: 'IMsg' },
        children: [
            {
                name: '公共msg',
                component: () => import('@/views/IMsg/index.vue'),
                path: '/msg',
                meta: { id: 'msg' }
            }
        ]
    },
    {
        name: 'tabs',
        component: () => import('@/layout/MainContent.vue'),
        path: '/ITabs',
        meta: { id: 'IMsg' },
        children: [
            {
                name: 'tabs',
                component: () => import('@/views/ITabs/index.vue'),
                path: '/tabs',
                meta: { id: 'tabs' }
            }
        ]
    },
    {
        name: 'text',
        component: () => import('@/layout/MainContent.vue'),
        path: '/text',
        meta: { id: 'text' },
        children: [
            {
                name: 'text',
                component: () => import('@/views/text/index.vue'),
                path: '/text',
                meta: { id: 'text' }
            },
            {
                name: 'img',
                component: () => import('@/views/text/img.vue'),
                path: '/img',
                meta: { id: 'img' }
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
